{% extends 'myhome/index.html' %}
{% block title %}
<title>天天生鲜-列表</title>
{% endblock %}
{% block main %}	
	<div class="navbar_con">
		<div class="navbar clearfix">
			<div class="subnav_con fl">
				<h1>全部商品分类</h1>	
				<span></span>			
				<ul class="subnav">
				{% for i in cate %}
					<li><a href="{% url 'myhome_goods_list' %}?fen={{i.id}}" class="fruit">{{i.name}}</a></li>
				{% endfor  %}
					
				</ul>
			</div>
			<ul class="navlist fl">
				<li><a href="{% url 'myhome_index' %}">首页</a></li>
				<li class="interval">|</li>
				<li><a href="">手机生鲜</a></li>
				<li class="interval">|</li>
				<li><a href="">抽奖</a></li>
			</ul>
		</div>
	</div>

	<div class="breadcrumb">
		<a href="#">全部分类</a>
		<span>></span>
		{% for i in cate %}
			{% if i.cid == request.GET.fen %}
				<a href="#">{{i.name}}</a>
			{% endif %}
		{% endfor %}
	</div>

	<div class="main_wrap clearfix">
		<div class="l_wrap fl clearfix">
			<div class="new_goods">
				<h3>新品推荐</h3>
				<ul>
					<li>
						<a href="#"><img src="/static/myhome/images/goods/goods001.jpg"></a>
						<h4><a href="#">进口柠檬</a></h4>
						<div class="prize">￥3.90</div>
					</li>
					<li>
						<a href="#"><img src="/static/myhome/images/goods/goods002.jpg"></a>
						<h4><a href="#">玫瑰香葡萄</a></h4>
						<div class="prize">￥16.80</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="r_wrap fr clearfix">
			<div class="sort_bar">
				<a href="?types=mo
				{% if request.GET.sou %}
				&sou={{request.GET.sou}}
				 {% else %}

				&fen={{request.GET.fen}}{% endif %}" class="active">默认</a>
				<a href="?types=price{% if request.GET.sou %}&sou={{request.GET.sou}} {% else %}
				&fen={{request.GET.fen}}{% endif %}
				">价格</a>
				<a href="?types=pr{% if request.GET.sou %}&sou={{request.GET.sou}} {% else %}
				&fen={{request.GET.fen}}{% endif %}">人气</a>
			</div>
			<ul class="goods_type_list cle	arfix">
			{% for i in goods %}
				<li>
					<a href="{% url 'myhome_goods_info' %}?id={{i.id}}"><img src="{{i.pic_url}}"></a>
					<h4><a href="{% url 'myhome_goods_info' %}?id={{i.id}}" title="{{i.title}}">{{i.title}}</a></h4>
					<div class="operate">
						<span class="prize">{{i.price}}</span>
						<!-- <span class="unit">16.80/500g</span> -->
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>
			{% endfor %}
			</ul>

			<div class="pagenation">
			<ul id="uls" style="clear: both;">
				{% load pagetag %}
				{% showHomeGoods goods.paginator.num_pages request %}
			</ul>
			</div>
		</div>
		<script type="text/javascript">
			$("#uls li").css("float","left")
		</script>
	</div>

{% endblock %}